<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/6
 * Time: 10:07
 */

//echo $_POST['userName'].'<br />';
//
//echo $_POST['pwd'];

$uName = $_GET['userName'];
$pwd = $_GET['pwd'];

if (!empty($uName)||!empty($pwd)){
    if ($uName=='admin'&&$pwd=='888888'){
        echo '登入成功，创建cookie';
        setcookie('Token',md5($uName.$pwd.time()),time()+24*3600);
        print_r($_COOKIE) ;
        echo '<a href="PersonalMsg.php"> 个人中心</a>';

    }
else{
    echo '登入失败';
}
}
else{
    echo '登入失败';
}